

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>网站设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/admin/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/admin/layuiadmin/style/admin.css" media="all">
</head>
<body>
<form class="layui-form" action="/admin/set/systemsite" method="post">
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">

                
                    
                <div class="layui-card">
                    <div class="layui-card-header">系统设置</div>
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                          <li class="layui-this">邀请设置</li>
                          <li>物流设置</li>
                          <li>积分设置</li>
                          <li>计划任务设置</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">是否开启推广</label>
                                    <div class="layui-input-inline">
                                        <input type="checkbox" lay-filter="switch" lay-verify="required" value="{if condition="isset($setres.istui)"}{$setres.istui}{/if}"  name="istui"
                                               {if condition="isset($setres.istui) && $setres.istui==1"} checked {/if} lay-skin="switch" lay-text="启用|关闭">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">开启则推广生效</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">分成类型</label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="sys_fenmo_type" value="0"  title="金额" {if condition="isset($setres.sys_fenmo_type) && $setres.sys_fenmo_type==0"} checked {/if}>
                                        <input type="radio" name="sys_fenmo_type" value="1"  title="积分" {if condition="isset($setres.sys_fenmo_type) && $setres.sys_fenmo_type==1"} checked {/if}>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">这里不要随意切换，运营后尽量选择一种不要变，否则统计不准确，也无法分开统计</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">上级分成</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_userrel1mo"  value="{if condition="isset($setres.sys_userrel1mo)"}{$setres.sys_userrel1mo}{/if}" placeholder="上级分成" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">推荐客户进来订场下单，师傅分多少钱，订单总额的百分比</div>
                                </div>
        
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">分成天数</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sysuserrelday"  value="{if condition="isset($setres.sysuserrelday)"}{$setres.sysuserrelday}{/if}" placeholder="分成天数" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">推荐的客户注册的多少天内下的订单才有分成</div>
                                </div>
        
                                <!--<div class="layui-form-item layui-form-text">-->
                                    <!--<label class="layui-form-label">上上级分成</label>-->
                                    <!--<div class="layui-input-inline">-->
                                        <!--<input type="text" name="sys_userrel2mo"  value="{:config('-systemsite.sys_userrel2mo')}" placeholder="上上级分成" class="layui-input">-->
                                    <!--</div>-->
                                    <!--<div class="layui-form-mid layui-word-aux">推荐客户进来下单，师傅的师傅分多少钱，订单总额的百分比</div>-->
                                <!--</div>-->
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">邀请介绍</label>
                                    <div class="layui-input-inline" style="width:500px;">
                                        <textarea name="sys_invitationtro" class="layui-textarea" placeholder="邀请介绍">{if condition="isset($setres.sys_invitationtro)"}{$setres.sys_invitationtro}{/if}</textarea>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">邀请介绍说明</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">邀请规则</label>
                                    <div class="layui-input-inline" style="width:500px;">
                                        <textarea name="sys_invitationmsg" class="layui-textarea" placeholder="邀请说明">{if condition="isset($setres.sys_invitationmsg)"}{$setres.sys_invitationmsg}{/if}</textarea>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">邀请规则说明</div>
                                </div>
        
                                <div class="layui-form-item">
                                    <label class="layui-form-label">邀请海报图</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_yaobgimg" value="{if condition="isset($setres.sys_yaobgimg)"}{$setres.sys_yaobgimg}{/if}"  placeholder="请上传图片" autocomplete="off" class="layui-input" >
                                        {if isset($setres.sys_yaobgimg) }
                                        <img src="<?php echo getUrl(); ?>{$setres.sys_yaobgimg}" id="img1" style="width:100px;">
                                        {/if}
                                    </div>
                                    <button style="float: left;" type="button" class="layui-btn" id="layuiadmin-upload-useradmin">上传图片</button>
                                </div>
        
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">邀请图介绍</label>
                                    <div class="layui-input-inline" style="width:500px;">
                                        <textarea name="sys_invitationcontent" class="layui-textarea" placeholder="邀请介绍">{if condition="isset($setres.sys_invitationcontent)"}{$setres.sys_invitationcontent}{/if}</textarea>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">邀请图上面的介绍</div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <blockquote class="layui-elem-quote">
                                    快递100
                                </blockquote>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">授权keY</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi100_key"  value="{if condition="isset($setres.sys_kuaidi100_key)"}{$setres.sys_kuaidi100_key}{/if}" placeholder="授权keY" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">快递100参数</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">customer</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi100_customer"  value="{if condition="isset($setres.sys_kuaidi100_customer)"}{$setres.sys_kuaidi100_customer}{/if}" placeholder="customer" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">快递100参数</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">secret</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi100_secret"  value="{if condition="isset($setres.sys_kuaidi100_secret)"}{$setres.sys_kuaidi100_secret}{/if}" placeholder="secret" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">快递100参数</div>
                                </div>
        
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">缓存物流信息</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi_cachehours"  value="{if condition="isset($setres.sys_kuaidi_cachehours)"}{$setres.sys_kuaidi_cachehours}{/if}" placeholder="缓存多少小时" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">缓存多少个小时，最低1小时，时间越短用的接口次数越多</div>
                                </div>
        
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">是否开启自提</label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="sys_openziti" value="0"  title="开启" {if condition="isset($setres.sys_openziti) && $setres.sys_openziti==0"} checked {/if}>
                                        <input type="radio" name="sys_openziti" value="1"  title="关闭" {if condition="isset($setres.sys_openziti) && $setres.sys_openziti==1"} checked {/if}>
        
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">开启则前端显示自提</div>
                                </div>

                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">寄件人姓名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi_jiname"  value="{if condition="isset($setres.sys_kuaidi_jiname)"}{$setres.sys_kuaidi_jiname}{/if}" placeholder="寄件人姓名" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">寄件人姓名</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">寄件人手机号</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi_phone"  value="{if condition="isset($setres.sys_kuaidi_phone)"}{$setres.sys_kuaidi_phone}{/if}" placeholder="寄件人手机号" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">寄件人手机号</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">寄件人省市</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi_jishengshi"  value="{if condition="isset($setres.sys_kuaidi_jishengshi)"}{$setres.sys_kuaidi_jishengshi}{/if}" placeholder="寄件人省市" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">寄件人省市，如四川省成都市</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">寄件人地址</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_kuaidi_jiaddress"  value="{if condition="isset($setres.sys_kuaidi_jiaddress)"}{$setres.sys_kuaidi_jiaddress}{/if}" placeholder="寄件人地址" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">寄件人地址</div>
                                </div>

                                <blockquote class="layui-elem-quote">
                                    达达配送
                                </blockquote>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">达达app_key</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_app_key"  value="{if condition="isset($setres.sys_dada_app_key)"}{$setres.sys_dada_app_key}{/if}" placeholder="达达app_key" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达app_key</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">达达app_secret</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_app_secret"  value="{if condition="isset($setres.sys_dada_app_secret)"}{$setres.sys_dada_app_secret}{/if}" placeholder="达达app_secret" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达app_secret</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">达达SourceID</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_source_id"  value="{if condition="isset($setres.sys_dada_source_id)"}{$setres.sys_dada_source_id}{/if}" placeholder="商户SourceID" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达商户SourceID</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">商户名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_sourcename"  value="{if condition="isset($setres.sys_dada_sourcename)"}{$setres.sys_dada_sourcename}{/if}" placeholder="商户名称" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达商户名称</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">门店编号</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_storeno"  value="{if condition="isset($setres.sys_dada_storeno)"}{$setres.sys_dada_storeno}{/if}" placeholder="门店编号" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达门店编号</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">门店名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_dada_storename"  value="{if condition="isset($setres.sys_dada_storename)"}{$setres.sys_dada_storename}{/if}" placeholder="门店名称" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">达达门店名称</div>
                                </div>
                                <blockquote class="layui-elem-quote">
                                    顺丰同城
                                </blockquote>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">开发者id</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_sf_dev_id"  value="{if condition="isset($setres.sys_sf_dev_id)"}{$setres.sys_sf_dev_id}{/if}" placeholder="顺丰开发者id" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">顺丰开发者id</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">开发者密钥</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_sf_dev_key"  value="{if condition="isset($setres.sys_sf_dev_key)"}{$setres.sys_sf_dev_key}{/if}" placeholder="顺丰开发者密钥" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">顺丰开发者密钥</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">店铺id</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_sf_shopid"  value="{if condition="isset($setres.sys_sf_shopid)"}{$setres.sys_sf_shopid}{/if}" placeholder="顺丰店铺id" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">顺丰店铺id</div>
                                </div>
                            </div>

                            <div class="layui-tab-item">
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">1积分抵扣多少金额</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_yiintemo"  value="{if condition="isset($setres.sys_yiintemo)"}{$setres.sys_yiintemo}{/if}" placeholder="1积分兑换多少金额" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">1积分抵扣多少金额，可以小数点，只能是数字</div>
                                </div>
        
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">1元赠送多少积分</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_giving_integral"  value="{if condition="isset($setres.sys_giving_integral)"}{$setres.sys_giving_integral}{/if}" placeholder="1元赠送多少积分" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">1元赠送多少积分</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">用户注册送积分</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_perfectuser"  value="{if condition="isset($setres.sys_perfectuser)"}{$setres.sys_perfectuser}{/if}" placeholder="用户注册送积分" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">用户注册送积分，只能是数字</div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">自动取消时间</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_ord_qumin"  value="{:config('-systemsite.sys_ord_qumin')}" placeholder="自动取消时间" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">读取多少分钟未付款订单，配合下面的计划任务才行</div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">自动收货天数</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="sys_auto_queren"  value="{:config('-systemsite.sys_auto_queren')}" placeholder="自动收货天数" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">读取多少天未收货订单，配合下面的计划任务才行</div>
                                </div>
        
                                
        
                                <blockquote class="layui-elem-quote">优惠券过期：{:config('-appsite.app_domainname')?:'域名/'}resource/Task/updatecouponstatus （优惠券过期了，可10分钟查询一次）</blockquote>
                                <blockquote class="layui-elem-quote">未支付商品订单：{:config('-appsite.app_domainname')?:'域名/'}resource/Task/updateorderstatus（15分钟内未支付）</blockquote>
        
                                <blockquote class="layui-elem-quote">自动收货：{:config('-appsite.app_domainname')?:'域名/'}resource/Task/autoreceive</blockquote>
                                <blockquote class="layui-elem-quote">会员卡到期：{:config('-appsite.app_domainname')?:'域名/'}resource/Vip/selectvip（到期会员卡作废）</blockquote>
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-card-body">

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="submit" class="layui-btn" value="确认保存">
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    </div>
</form>

<script src="/admin/layuiadmin/layui/layui.js"></script>
<script src="/admin/layuiadmin/jq/jquery.js"></script>
<script>
    layui.config({
        base: '/admin/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload','layedit'], function(){
        var $ = layui.$
            ,form = layui.form
            ,upload = layui.upload,layedit = layui.layedit;
        form.on('switch', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
        form.on('switch1', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 0 : 1);
        });
        form.on('switch2', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
        form.on('switch3', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
        form.on('switch4', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
        form.on('switch5', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
        upload.render({
            elem: '#layuiadmin-upload-useradmin' //绑定元素
            ,url: "{:url('/admin/Index/upload')}" //上传接口
            ,ext: 'jpg|png|gif'//限制文件
            ,done: function(res){
                //上传完毕回调
                $(this.item).prev("div").children("input").val(res.filename);
                document.getElementById('img1').src = res.filename;
                layer.msg("上传成功");
            }
            ,error: function(){
                //请求异常回调
            }
        });
        upload.render({
            elem: '#layuiadmin-upload-useradmin2' //绑定元素
            ,url: "{:url('/admin/Index/upload')}" //上传接口
            ,ext: 'jpg|png|gif'//限制文件
            ,done: function(res){
                //上传完毕回调
                $(this.item).prev("div").children("input").val(res.filename);
                document.getElementById('img2').src = res.filename;
                layer.msg("上传成功");
            }
            ,error: function(){
                //请求异常回调
            }

        });


    })
</script>
</body>
</html>